package com.grace.cms.query.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.grace.cms.common.domain.entity.CmsTheme;
import com.grace.cms.query.mapper.ThemeSearchMapper;
import com.grace.cms.query.service.IThemeSearchService;

@Service
public class ThemeSearchServiceImpl implements IThemeSearchService {

    @Autowired
    private ThemeSearchMapper themeSearchMapper;


    @Override
    public List<CmsTheme> listCmsTheme(String webName) {
        CmsTheme cmsTheme = new CmsTheme();
        cmsTheme.setWebName(webName);
        return themeSearchMapper.listCmsTheme(cmsTheme);
    }

    @Override
    public CmsTheme selectCmsThemeByWt(CmsTheme cmsTheme) {

        return themeSearchMapper.selectCmsThemeByWt(cmsTheme);
    }

    @Override
    public CmsTheme selectCmsThemeByWt(String webName, String themeName) {
        CmsTheme cmsTheme = new CmsTheme();
        cmsTheme.setWebName(webName);
        cmsTheme.setThemeName(themeName);
        CmsTheme returnTheme = this.selectCmsThemeByWt(cmsTheme);
        return returnTheme;
    }



}
